All Questions
2 questions
-1votes
2answers
912views
Where to place exception handling while using Decorator design pattern
How to design a service layer structure that will be resistant to exceptions. Let's say I have a simple OrderService service, this service performs basic operations - saving an order. public interface ...
35votes
5answers
51kviews
Function returning true/false vs. void when succeeding and throwing an exception when failing
I'm building an API, a function that uploads a file. This function will return nothing/void if the file was uploaded correctly and throws an exception when there was some problem. Why an exception ...